{% extends 'base.twig' %}
{% block content %}
    <section id="main-content">
        <section class="wrapper">
            <div class="row mt">
                <div class="col-lg-12">
                    <div class="form-panel">
                        <h4 class="mb text-info">
                            <i class="fa fa-edit"></i> 主页设置
                            <button class="text-right btn btn-success pull-right" {% if readonly is null %} onclick="$('#submit').click();" {% endif %} >
                                <i class="fa fa-save"></i> 保 存
                            </button>
                        </h4>
                        <form id='form' name="form" class="form-horizontal style-form" method="post" action="site.php">
                            <button type="submit" id="submit" class="hidden"></button>
                            <input type="hidden" name="update" value="{% if title is null %}0{% else %}1{% endif %}">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center"> 域名选择 </label>
                                <div class="col-sm-4">
                                    <select name="domain" class="form-control">
                                        <option value="{{ domain }}">{{ domain }}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center"> 首页标题 </label>
                                <div class="col-sm-8">
                                    <input type="text" name="title" value="{{ title|raw }}" class="form-control" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center" > 选择语言 </label>
                                <div class="col-sm-4 zone">
                                    <select id="id_lang" name="lang" class="form-control" required>
                                        <option value="TW" {% if lang == 'TW' %} selected {% endif %}> 繁体中文 </option>
                                        <option value="EN" {% if lang == 'EN' %} selected {% endif %}> 英语 </option>
                                        <option value="CN" {% if lang == 'CN' %} selected {% endif %}> 简体中文 </option>
                                        <option value="JP" {% if lang == 'JP' %} selected {% endif %}> 日语 </option>
                                        <option value="AR" {% if lang == 'AR' %} selected {% endif %}> 阿拉伯语 </option>
                                        <option value="VNM" {% if lang == 'VNM' %} selected {% endif %}> 越南语 </option>
                                        <option value="THA" {% if lang == 'THA' %} selected {% endif %}> 泰语 </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center"> SEO标题 </label>
                                <div class="col-sm-8">
                                    <input type="text" name="seo_title" value="{{ seo_title|raw }}" class="form-control" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center">SEO描述 </label>
                                <div class="col-sm-8">
                                    <input type="text" name="seo_description" value="{{ seo_description|raw }}" class="form-control" required>
                                </div>
                                <span style="color: #F00;">*</span>40个字符以内
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 text-center">Google Analytics </label>
                                <div class="col-sm-8">
                                    <textarea type="text" class="form-control" name="google_js" style="height:200px;">{{ google_js|raw }}</textarea>
                                </div>
                            </div>
                            <input type="hidden" name="act" value="save">
                        </form>
                    </div>

                </div>
            </div>
        </section>
    </section>

    <script type="text/javascript">
        highlight_subnav('site.php?');
    </script>
{% endblock %}